import request from '@/utils/request'

// 查询排课结果统计列表
export function listScheduleStatistics(query) {
  return request({
    url: '/jwgl/schedule/statistics/list',
    method: 'get',
    params: query
  })
}

// 查询排课结果统计详细
export function getScheduleStatistics(statisticsId) {
  return request({
    url: '/jwgl/schedule/statistics/' + statisticsId,
    method: 'get'
  })
}

// 新增排课结果统计
export function addScheduleStatistics(data) {
  return request({
    url: '/jwgl/schedule/statistics',
    method: 'post',
    data: data
  })
}

// 修改排课结果统计
export function updateScheduleStatistics(data) {
  return request({
    url: '/jwgl/schedule/statistics',
    method: 'put',
    data: data
  })
}

// 删除排课结果统计
export function delScheduleStatistics(statisticsId) {
  return request({
    url: '/jwgl/schedule/statistics/' + statisticsId,
    method: 'delete'
  })
}

// 根据任务ID查询统计信息
export function getStatisticsByTaskId(taskId) {
  return request({
    url: '/jwgl/schedule/statistics/task/' + taskId,
    method: 'get'
  })
}

// 根据学期查询统计列表
export function getStatisticsBySemester(semester) {
  return request({
    url: '/jwgl/schedule/statistics/semester/' + semester,
    method: 'get'
  })
}

// 查询最近的统计记录
export function getRecentStatistics(limit) {
  return request({
    url: '/jwgl/schedule/statistics/recent',
    method: 'get',
    params: { limit: limit }
  })
}

// 获取学期统计摘要
export function getSemesterSummary(semester) {
  return request({
    url: '/jwgl/schedule/statistics/summary/' + semester,
    method: 'get'
  })
}

// 获取统计图表数据
export function getStatisticsChartData(params) {
  return request({
    url: '/jwgl/schedule/statistics/chart',
    method: 'get',
    params: params
  })
}

// 导出排课结果统计
export function exportScheduleStatistics(query) {
  return request({
    url: '/jwgl/schedule/statistics/export',
    method: 'post',
    data: query
  })
}